//
//  AddPersonInfoView.m
//  laowu
//
//  Created by 尹桥印 on 15/5/11.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "AddPersonInfoView.h"


@implementation AddPersonInfoView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setFrame:frame];
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
        [btn setHeight:self.height];
        [btn setWidth:50];
        [btn setX:self.width-btn.width];
        [btn setTitle:@"删除" forState:UIControlStateNormal];
        [btn.titleLabel setFont:[UIFont systemFontOfSize:14]];
        [btn setTitleColor:THEME_COLOR forState:UIControlStateNormal];
        [self addSubview:btn];
        self.deleteBtn = btn;
        
        UITextField *field = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, btn.x, self.height)];
        [field setBackground:[UIImage resizedImage:@"lw_kuang2"]];
        [field setFont:[UIFont systemFontOfSize:14]];
        
        CGRect rect = field.frame;
        rect.size.width = 8;
        [field setLeftView:[[UIView alloc] initWithFrame:rect]];
        [field setLeftViewMode:UITextFieldViewModeAlways];
        
        [self addSubview:field];
        self.textField = field;
    }
    return self;
}

@end
